package com.tfr.webflux.entity;

import lombok.Data;
import org.hibernate.validator.constraints.Range;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import javax.validation.constraints.NotBlank;

/**
 * @description:
 * @author: rain
 * @date: Created in 2021/12/7 18:56
 * @version:
 * @modified By:
 */
@Document( "user")
@Data
public class User {

  @Id
  private String id;

  @NotBlank
  private String name;

  @Range(min = 10,max = 150)
  private int age;
}
